package br.com.marcelo.reservasis.client.services.apartamento;

import br.com.aroeirasoftware.gwtcomponents.client.query.ASQuery;
import br.com.aroeirasoftware.gwtcomponents.client.query.ASQueryResult;
import br.com.marcelo.reservasis.domain.model.Apartamento;
import br.com.marcelo.reservasis.domain.model.TipoApartamento;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

/**
 *
 * @author Marcelo
 */
@RemoteServiceRelativePath("ApartamentoUIService.rpc")
public interface ApartamentoUIService extends RemoteService {

    public Integer salvar(Apartamento arg0) throws RuntimeException;

    public void atualizar(Apartamento arg0) throws RuntimeException;

    public void excluir(Apartamento arg0) throws RuntimeException;

    public Apartamento getPorId(Integer arg0) throws RuntimeException;

    public ASQueryResult<Apartamento> getPorConsulta(ASQuery arg0) throws RuntimeException;

    public ASQueryResult<TipoApartamento> getTipoApartamentoPorConsulta(ASQuery arg0) throws RuntimeException;

    public static class Async {

        private static final ApartamentoUIServiceAsync INSTANCE = GWT.create(ApartamentoUIService.class);

        public static ApartamentoUIServiceAsync getInstance() {
            return INSTANCE;
        }
    }
}
